<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>编辑脏器功能从表</title>
	<#include "/common/resource.ftl">
	<script type="text/javascript">
		$(function () {
			<#if (params.healthId)??>
				$.ajaxRequest({
					url: '${params.contextPath}/web/elderOrganFunction/query.json',
					data: {elderHealthId: "${params.healthId}"},
					success: function (data) {
						if (!data.success) {
							$.message(data.message);
							return;
						}
						var record = data.data;
						for (var key in record) {
						    if (key == 'oralCavityLipsStatus') {
                                var oralCavityLipsStatus = record.oralCavityLipsStatus;
                                $("select[name='oralCavityLipsStatus']").val(oralCavityLipsStatus);
                            } else if (key == 'oralCavityDentitionStatus') {
                                var oralCavityDentitionStatus = record.oralCavityDentitionStatus;
                                $("select[name='oralCavityDentitionStatus']").val(oralCavityDentitionStatus);
                            } else if (key == 'oralCavityPharyngealStatus') {
                                var oralCavityPharyngealStatus = record.oralCavityDentitionStatus;
                                $("select[name='oralCavityPharyngealStatus']").val(oralCavityPharyngealStatus);
                            } else if (key == 'hearingStatus') {
                                var hearingStatus = record.hearingStatus;
                                $("select[name='hearingStatus']").val(hearingStatus);
                            } else if (key == 'motorFunction') {
                                var motorFunction = record.motorFunction;
                                $("select[name='motorFunction']").val(motorFunction);
                            } else if (key == 'skinStatus') {
                                var skinStatus = record.skinStatus;
                                $("select[name='skinStatus']").val(skinStatus);
                            } else if (key == 'scleraStatus') {
                                var scleraStatus = record.scleraStatus;
                                $("select[name='scleraStatus']").val(scleraStatus);
                            } else if (key == 'lymphadenStatus') {
                                var lymphadenStatus = record.lymphadenStatus;
                                $("select[name='lymphadenStatus']").val(lymphadenStatus);
                            } else if (key == 'isLungBarrelChest') {
                                var isLungBarrelChest = record.isLungBarrelChest;
                                $("select[name='isLungBarrelChest']").val(isLungBarrelChest);
                            } else if (key == 'lungBreathSoundsStatus') {
                                var lungBreathSoundsStatus = record.lungBreathSoundsStatus;
                                $("select[name='lungBreathSoundsStatus']").val(lungBreathSoundsStatus);
                            } else if (key == 'lungRaleStatus') {
                                var lungRaleStatus = record.lungRaleStatus;
                                $("select[name='lungRaleStatus']").val(lungRaleStatus);
                            } else if (key == 'heartRhythmStatus') {
                                var heartRhythmStatus = record.heartRhythmStatus;
                                $("select[name='heartRhythmStatus']").val(heartRhythmStatus);
                            } else if (key == 'heartNoise') {
                                var heartNoise = record.heartNoise;
                                $("select[name='heartNoise']").val(heartNoise);
                            } else if (key == 'abdomenTendernessStatus') {
                                var abdomenTendernessStatus = record.abdomenTendernessStatus;
                                $("select[name='abdomenTendernessStatus']").val(abdomenTendernessStatus);
                            } else if (key == 'abdomenEnclosedmassStatus') {
                                var abdomenEnclosedmassStatus = record.abdomenEnclosedmassStatus;
                                $("select[name='abdomenEnclosedmassStatus']").val(abdomenEnclosedmassStatus);
                            } else if (key == 'abdomenHepatomegalyStatus') {
                                var abdomenHepatomegalyStatus = record.abdomenHepatomegalyStatus;
                                $("select[name='abdomenHepatomegalyStatus']").val(abdomenHepatomegalyStatus);
                            } else if (key == 'abdomenSplenauxeStatus') {
                                var abdomenSplenauxeStatus = record.abdomenSplenauxeStatus;
                                $("select[name='abdomenSplenauxeStatus']").val(abdomenSplenauxeStatus);
                            } else if (key == 'abdomenShiftingDullnessStatus') {
                                var abdomenShiftingDullnessStatus = record.abdomenShiftingDullnessStatus;
                                $("select[name='abdomenShiftingDullnessStatus']").val(abdomenShiftingDullnessStatus);
                            } else if (key == 'lowerExtremityEdemaStatus') {
                                var lowerExtremityEdemaStatus = record.lowerExtremityEdemaStatus;
                                $("select[name='lowerExtremityEdemaStatus']").val(lowerExtremityEdemaStatus);
                            } else if (key == 'footPulsesDorsalStatus') {
                                var footPulsesDorsalStatus = record.footPulsesDorsalStatus;
                                $("select[name='footPulsesDorsalStatus']").val(footPulsesDorsalStatus);
                            } else if (key == 'anusDreStatus') {
                                var anusDreStatus = record.anusDreStatus;
                                $("select[name='anusDreStatus']").val(anusDreStatus);
                            } else if (key == 'breastStatus') {
                                var breastStatus = record.breastStatus;
                                var breastStatusArray = breastStatus.split(",");
                                var breastStatusAll = $("input[name='breastStatus']");
                                for(var i=0; i<breastStatusArray.length; i++){
                                    //获取所有复选框对象的value属性，然后，symptomArray[i]和他们匹配，如果有，则说明他应被选中
                                    $.each(breastStatusAll,function(j,checkbox){
                                        //获取复选框的value属性
                                        var checkValue = $(checkbox).val();
                                        if(breastStatusArray[i] == checkValue){
                                            $(checkbox).attr("checked",true);
                                            $(checkbox).next().addClass('layui-form-checked');
                                        }
                                    });
                                }
                            } else {
                                $("[name='" + key + "']").val(record[key]);
                            }
						}
                        var form = layui.form;
                        form.render();
					}
				});
			</#if>
		});
	</script>
    <link rel="stylesheet" href="${params.contextPath}/static/plug/layui/css/layui.css">
    <style>
        .layui-form select {display:none !important;}
    </style>
</head>
<body>
	<div class="ui-form">
        <#if (params.healthId)??>
		<form class="layui-form ajax-form" action="${params.contextPath}/web/elderOrganFunction/<#if (params.id)??>modify<#else>save</#if>.json" method="post">
			<input type="hidden" name="elderHealthId" value="${params.healthId}" />
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">口唇<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="oralCavityLipsStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="红润">红润</option>
                                        <option value="苍白">苍白</option>
                                        <option value="发绀">发绀</option>
                                        <option value="皲裂">皲裂</option>
                                        <option value="疱疹">疱疹</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">齿列<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="oralCavityDentitionStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="正常">正常</option>
                                        <option value="缺齿">缺齿</option>
                                        <option value="龋齿">龋齿</option>
                                        <option value="义齿(假牙)">义齿(假牙)</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">咽部状态<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="oralCavityPharyngealStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无充血">无充血</option>
                                        <option value="充血">充血</option>
                                        <option value="淋巴滤泡增生">淋巴滤泡增生</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">听力<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="hearingStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="听见">听见</option>
                                        <option value="听不清或无法听见">听不清或无法听见</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">运动功能<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="motorFunction" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="可顺利完成">可顺利完成</option>
                                        <option value="无法独立完成其中任何一个动作">无法独立完成其中任何一个动作</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <div class="layui-form-item">
                                <label class="layui-form-label">皮肤<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="skinStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="正常">正常</option>
                                        <option value="潮红">潮红</option>
                                        <option value="苍白">苍白</option>
                                        <option value="发绀">发绀</option>
                                        <option value="黄染">黄染</option>
                                        <option value="色素沉着">色素沉着</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">其他皮肤状态<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="skinStatusOther" placeholder="请输入其他皮肤状态" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <div class="layui-form-item">
                                <label class="layui-form-label">巩膜<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="scleraStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="正常">正常</option>
                                        <option value="黄染">黄染</option>
                                        <option value="充血">充血</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">其他巩膜状态<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="scleraStatusOther" placeholder="请输入其他巩膜状态" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <div class="layui-form-item">
                                <label class="layui-form-label">淋巴结<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="lymphadenStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="未触及">未触及</option>
                                        <option value="锁骨上">锁骨上</option>
                                        <option value="腋窝">腋窝</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">其他淋巴结状态<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="lymphadenStatusOther" placeholder="请输入其他淋巴结状态" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">是否桶状胸<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="isLungBarrelChest" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="否">否</option>
                                        <option value="是">是</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">呼吸音<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="lungBreathSoundsStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="正常">正常</option>
                                        <option value="异常">异常</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-form-item">
                                <label class="layui-form-label">呼吸音异常信息<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="lungBreathSoundsAbnormal" placeholder="请输入呼吸音异常信息" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">罗音<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="lungRaleStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="干罗音">干罗音</option>
                                        <option value="湿罗音">湿罗音</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">其他罗音状态<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="lungRaleStatusOther" placeholder="请输入其他罗音状态" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">心率(次/分钟)<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="heartRate" placeholder="请输入心率(次/分钟)" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">心律<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="heartRhythmStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="齐">齐</option>
                                        <option value="不齐">不齐</option>
                                        <option value="绝对不齐">绝对不齐</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">杂音<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="heartNoise" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="有">有</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">杂音说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="heartNoiseYes" placeholder="杂音说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部压痛<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="abdomenTendernessStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="有">有</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部压痛说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="abdomenTendernessYes" placeholder="请输入腹部压痛说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部包块<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="abdomenEnclosedmassStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="有">有</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部包块说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="abdomenEnclosedmassYes" placeholder="请输入腹部包块说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部肝大<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="abdomenHepatomegalyStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="有">有</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部肝大说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="abdomenHepatomegalyYes" placeholder="请输入腹部肝大说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部脾大<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="abdomenSplenauxeStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="有">有</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">腹部脾大说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="abdomenSplenauxeYes" placeholder="请输入腹部脾大说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">移动性浊音<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="abdomenShiftingDullnessStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="有">有</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">移动性浊音说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="abdomenShiftingDullnessYes" placeholder="请输入移动性浊音说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">下肢水肿<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="lowerExtremityEdemaStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="无">无</option>
                                        <option value="单侧">单侧</option>
                                        <option value="双侧不对称">双侧不对称</option>
                                        <option value="双侧对称">双侧对称</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">足背动脉搏动<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="footPulsesDorsalStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="未触及">未触及</option>
                                        <option value="触及双侧对称">触及双侧对称</option>
                                        <option value="触及左侧弱或消失">触及左侧弱或消失</option>
                                        <option value="触及右侧弱或消失">触及右侧弱或消失</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">肛门指诊<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="anusDreStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="未及异常">未及异常</option>
                                        <option value="触痛">触痛</option>
                                        <option value="包块">包块</option>
                                        <option value="前列腺异常">前列腺异常</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">其他肛门指诊说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="anusDreStatusOther" placeholder="请输入其他肛门指诊说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">乳腺<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <select name="breastStatus" class="layui-input">
                                        <option value="">请选择</option>
                                        <option value="未见异常">未见异常</option>
                                        <option value="乳房切除">乳房切除</option>
                                        <option value="异常泌乳">异常泌乳</option>
                                        <option value="乳腺包块">乳腺包块</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">其他乳腺状态说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="breastStatusOther" placeholder="请输入其他乳腺状态说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">其他脏器功能说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="otherRemark" placeholder="请输入其他脏器功能说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">辅助检查说明<span class="ui-request">*</span></label>
                                <div class="layui-input-block">
                                    <input type="text" name="accessoryExaminationRemark" placeholder="请输入辅助检查说明" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<input type="submit" value="保存" class="layui-btn" />
				</div>
			</div>
		</form>
        <#else>
            请先保存老人健康基本信息!
        </#if>
    </div>
</body>
<script src="${params.contextPath}/static/plug/layui/layui.all.js"></script>
<script>
    $(function () {
        var form = layui.form;
        form.render();
    })
</script>
</html>
